
import { useEffect } from 'react';
import styles from './index.module.scss';
import './progress.scss'
const Open: React.FC<{ open: boolean, setOpen: React.Dispatch<React.SetStateAction<boolean>> }> =
    ({ open, setOpen }) => {

        useEffect(() => {
            setTimeout(() => {
                setOpen(false)
            }, 4000);
        }, [setOpen])

        if (!open) {
            return null
        }
        
        return (
            <div className={styles.box} >

                <p>正在启动中</p>
                <div className="pbox">
                    <div className='progress'></div>
                </div>

            </div>
        )
    }


export default Open